const uuid = require("node-uuid");

exports.getUuid = () => {
  return uuid.v4(); // 生成随机的UUID
};

/**
 * @param {Object} params 参数
 * @param {Array} vaildList 必填参数列表
 */
exports.paramsValid = (params, vaildList) => {
  for (let key in vaildList) {
    if (!params[vaildList[key]]) {
      return vaildList[key];
    }
  }
  return false;
};
